package com.log.controller.api;

import com.common.untils.CommonResult;
import com.log.service.ILogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @create 2022-09-02
 */
@RestController
@RequestMapping("api/log")
public class LogControllerApi {
    @Autowired
    private ILogService logService;
    @PostMapping("/caozuolog")
    private CommonResult addLog(String caozuo, HttpServletRequest request){
        String token = request.getHeader("token");
        return logService.insertLog(caozuo,token);
    }
}
